﻿CREATE PROCEDURE [dbo].[TempArticleSales_UpdateArticleIds]
		@RangeReviewId int
AS

Update TempArticleSales
Set ArticleId = a.Id
From TempArticleSales t
Inner Join Articles a on t.ArticleCode = a.Code
					 and t.UOM = a.UOM
					 and t.RangeReviewId = @RangeReviewId